﻿using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Batman.CasServerTest.Controllers
{
    public class LoginController : Controller
    {
        public async Task Index(string returnUrl)
        {
            // 这边跳转到 cas server
            var props = new AuthenticationProperties { RedirectUri = returnUrl };
            await HttpContext.ChallengeAsync("CAS", props);
        }

    }
}
